﻿// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// This file is part of CodingEditor.
// Note:	This project is derived from Peter Project
//			(hosted on sourceforge and codeplex)
//
// Copyright (c) 2008-2009, CE Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


namespace CE.API
{
    using System.Drawing;

    using WeifenLuo.WinFormsUI.Docking;
    public interface ICEPluginHost
    {
        #region Properties

        /// <summary>
        /// Gets the path the Application started in...
        /// </summary>
        string ApplicationExeStartPath
        {
            get;
        }

        /// <summary>
        /// Gets the Type for a Editor in string format (typeof(Editor))...
        /// </summary>
        string EditorType
        {
            get;
        }

        #endregion Properties

        #region Methods

        /// <summary>
        /// Adds the given Dock Content to the form...
        /// </summary>
        /// <param name="content">Content to Add.</param>
        void AddDockContent( DockContent content);

        /// <summary>
        /// Adds the given Dock Content to the form...
        /// </summary>
        /// <param name="content">Content to Add.</param>
        /// <param name="state">State of Content</param>
        void AddDockContent( DockContent content, DockState state);

        /// <summary>
        /// Adds the given Dock Content to the form...
        /// </summary>
        /// <param name="content">Content to Add.</param>
        /// <param name="floatingRec">Floating Rectangle</param>
        void AddDockContent( DockContent content,  Rectangle floatingRec);

        /// <summary>
        /// Creates a new Editor with the given file...
        /// </summary>
        /// <param name="fileName">File to load in Editor.</param>
        /// <param name="tabName">Name of Tab.</param>
        void CreateEditor( string path,  string tabName);

        /// <summary>
        /// Creates a new Editor with the given file...
        /// </summary>
        /// <param name="fileName">File to load in Editor.</param>
        /// <param name="tabName">Name of Tab.</param>
        /// <param name="image">Icon for Tab.</param>
        void CreateEditor( string path,  string tabName,  Icon image);

        /// <summary>
        /// Creates a new Editor with the given file...
        /// </summary>
        /// <param name="fileName">File to load in Editor.</param>
        /// <param name="tabName">Name of Tab.</param>
        /// <param name="image">Icon for Tab.</param>
        /// <param name="addToContent">Content to add to group.</param>
        void CreateEditor( string path,  string tabName,  Icon image, IDockContent addToContent);

        /// <summary>
        /// Gets the Shell Icon for the given file...
        /// </summary>
        /// <param name="filePath">Path to File.</param>
        /// <param name="linkOverlay">Link Overlay or not.</param>
        /// <returns>Shell Icon for File.</returns>
        Icon GetFileIcon( string path, bool linkOverlay);

        /// <summary>
        /// Creates a new blank editor...
        /// </summary>
        void CreateNewDocument();

        /// <summary>
        /// Saves the Given Content As...
        /// </summary>
        /// <param name="tab">Content to Save</param>
        void SaveAsCurrentFile(ICEPluginTab tab);

        /// <summary>
        /// Writes the given text in the status bar...
        /// </summary>
        /// <param name="text">Text to Write.</param>
        void ChangeStatus(string text);

        #endregion Methods
    }
}